package com.runtime;

import com.util.ImageUtil;

import java.awt.Graphics;
import java.awt.Image;

public class PencilUp extends Pencil {

    private Image image;

    public PencilUp(int x, int y) {
        init(x, y);
    }

    private void init(int x, int y) {
        image = ImageUtil.get("pu");
        setX(x);
        setY(y);
        setWidth(image.getWidth(null));
        setHeight(image.getHeight(null));
    }

    @Override
    public void draw(Graphics g) {
        g.drawImage(image, getX(), getY(), null);
    }


}

